import 'package:mziot/app/data/device_info_entity.dart';
import 'package:mziot/generated/json/base/json_convert_content.dart';

DeviceInfoEntity $DeviceInfoEntityFromJson(Map<String, dynamic> json) {
  final DeviceInfoEntity deviceInfoEntity = DeviceInfoEntity();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    deviceInfoEntity.id = id;
  }
  final String? deviceName = jsonConvert.convert<String>(json['deviceName']);
  if (deviceName != null) {
    deviceInfoEntity.deviceName = deviceName;
  }
  final String? deviceBluetooth = jsonConvert.convert<String>(json['deviceBluetooth']);
  if (deviceBluetooth != null) {
    deviceInfoEntity.deviceBluetooth = deviceBluetooth;
  }
  final String? deviceSerialnum = jsonConvert.convert<String>(json['deviceSerialnum']);
  if (deviceSerialnum != null) {
    deviceInfoEntity.deviceSerialnum = deviceSerialnum;
  }
  final String? deviceImg = jsonConvert.convert<String>(json['deviceImg']);
  if (deviceImg != null) {
    deviceInfoEntity.deviceImg = deviceImg;
  }
  final int? groupId = jsonConvert.convert<int>(json['groupId']);
  if (groupId != null) {
    deviceInfoEntity.groupId = groupId;
  }
  final String? groupName = jsonConvert.convert<String>(json['groupName']);
  if (groupName != null) {
    deviceInfoEntity.groupName = groupName;
  }
  final bool? isNetDevice = jsonConvert.convert<bool>(json['isNetDevice']);
  if (isNetDevice != null) {
    deviceInfoEntity.isNetDevice = isNetDevice;
  }
  return deviceInfoEntity;
}

Map<String, dynamic> $DeviceInfoEntityToJson(DeviceInfoEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['deviceName'] = entity.deviceName;
  data['deviceBluetooth'] = entity.deviceBluetooth;
  data['deviceSerialnum'] = entity.deviceSerialnum;
  data['deviceImg'] = entity.deviceImg;
  data['groupId'] = entity.groupId;
  data['groupName'] = entity.groupName;
  data['isNetDevice'] = entity.isNetDevice;
  return data;
}
